/*    */ package com.qmsk.business.area.location.controller;
/*    */ 
/*    */ import com.qmsk.business.area.location.dao.LocationDAO;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import com.utils.web.RequestUtils;
/*    */ import com.utils.web.ResponseUtils;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.PathVariable;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"location"})
/*    */ public class LocationController
/*    */ {
/* 21 */   Logger logger = Logger.getLogger(LocationController.class);
/*    */ 
/*    */   @Autowired
/*    */   private LocationDAO dao;
/*    */ 
/*    */   @RequestMapping({"province"})
/*    */   public void getProvince(HttpServletRequest request, HttpServletResponse response)
/*    */   {
/*    */     try
/*    */     {
/* 36 */       GsonEbRst rst = this.dao.getProvince();
/* 37 */       ResponseUtils.setResponseResult(rst, response);
/*    */     } catch (Exception e) {
/* 39 */       this.logger.error(e);
/* 40 */       ResponseUtils.setErrorMsgResponse(
/* 41 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ 
/*    */   @RequestMapping({"city/{code}"})
/*    */   public void getCity(HttpServletRequest request, HttpServletResponse response, @PathVariable("code") Integer code)
/*    */   {
/*    */     try
/*    */     {
/* 56 */       GsonEbRst rst = this.dao.getCity(code);
/* 57 */       ResponseUtils.setResponseResult(rst, response);
/*    */     } catch (Exception e) {
/* 59 */       this.logger.error(e);
/* 60 */       ResponseUtils.setErrorMsgResponse(
/* 61 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ 
/*    */   @RequestMapping({"countries/{code}"})
/*    */   public void getCounties(HttpServletRequest request, HttpServletResponse response, @PathVariable("code") Integer code)
/*    */   {
/*    */     try
/*    */     {
/* 76 */       GsonEbRst rst = this.dao.getCountries(code);
/* 77 */       ResponseUtils.setResponseResult(rst, response);
/*    */     } catch (Exception e) {
/* 79 */       this.logger.error(e);
/* 80 */       ResponseUtils.setErrorMsgResponse(
/* 81 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.area.location.controller.LocationController
 * JD-Core Version:    0.5.3
 */